1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method for reducing noise contained in image data.
2. Description of the Related Art
Digital still cameras and digital video cameras have come into widespread general use. These digital image capturing devices generate digital image data by converting, into digital signals, light received by a photoelectric conversion element (image capturing element), such as a CCD or CMOS sensor. To obtain image data representing a color image, color filters having different transmittances depending on the wavelength of light are arranged regularly in front of the image capturing element. A digital image capturing device generates color signals based on the difference among the amounts of light transmitted through the color filters. Thus, image data recorded by the digital image capturing device (hereinafter referred to as RAW image data) is recorded in accordance with the placement of the color filters. After being recorded, the RAW image data is subjected to a series of image processing operations, such as white balance correction and pixel interpolation. As a result, image data representing a general color image, such as an RGB image, is generated.
In the process of generating digital image data, noise such as dark-current noise, thermal noise, and shot noise is generated by the characteristics of the image capturing element and circuit, and contaminates the digital image data. The noise is more noticeable now than before since image capturing elements developed in recent years have been reduced in size, have more pixels, and therefore have a super-high pixel pitch. The noise is generated markedly and is a strong factor in image degradation, especially in a case, for example, where ISO sensitivity is increased. For this reason, to obtain a high-quality image by reducing such noise, noise contaminating the RAW image data needs to be reduced.
In a conventionally-known method, noise is reduced by using a low-pass filter which allows only a signal component at or below a noise frequency to pass therethrough. However, this method blurs not only the noise but also the edge, and therefore makes it difficult to obtain a high-quality image. Thus, a number of methods have been proposed for reducing noise adaptively by sorting out, in some way, information on the noise and information on the edge.
General adaptive noise reduction reduces noise in the following manner. Specifically, to reduce noise in a target pixel, multiple pixels near the target pixel are selected as reference pixels, and the value of the target pixel is replaced with an appropriate weighted average of the reference pixels.
As one of methods for the adaptive noise reduction, there is a technique which achieves noise reduction by defining an area including a target pixel (a target area), obtaining the similarity between the target pixel and its reference pixels in a unit of the area, and calculating a weighted average according to the similarity (Japanese Patent Laid-Open No. 2007-536662 and Japanese Patent Laid-Open No. 2011-39675).
In the conventional methods, the target area and the reference pixels can be set freely on a general color image such as an RGB image or an image such as a grayscale image having signal values of the same level within the image. However, in a case of an image like a RAW image in which pixels have signal values of different levels depending on the color filter, there is a problem that noise cannot be reduced by simply setting the target area and the reference pixels. On the other hand, in a case where the conventional methods are used on a color image generated from a RAW image, color image data needs to be generated by performing pixel interpolation and the like on RAW image data which still contains noise, which contributes to image quality degradation.